// 订单商品
const mongoose = require('mongoose');
const orderGoodsSchema = new mongoose.Schema({
    count: String, // 订单商品数量
    time: String,  // 下单时间
    state: String, // 订单状态）待付款/待收货/待评价/已收货）
    kind:String, // 种类
    money:String, // 实际支付金额
    goodsId: {
        type: mongoose.Schema.Types.ObjectId,
        ref: "goodsModel"
    }, // 所属订单商品id

    addressesId: {
        type: mongoose.Schema.Types.ObjectId,
        ref: "addressesModel"
    }, // 地址

    userId: {
        type: mongoose.Schema.Types.ObjectId,
        ref: "usersModel"
    }, //	订单商品用户id

    adminId: {
        type: mongoose.Schema.Types.ObjectId,
        ref: "adminsModel"
    }, // 所属门店管理员id
    shopId: {
        type: mongoose.Schema.Types.ObjectId,
        ref: "shopsModel"
    }, // 所属门店id
});
module.exports = mongoose.model('orderGoodsModel', orderGoodsSchema, 'orderGoods');
